// Pistol

ACTOR IDMPistol : IDMWeapon
{
	Weapon.SelectionOrder 1000
	Weapon.SlotNumber 2
	Weapon.Sisterweapon "DualPistol"
	Weapon.PreferredSkin "PistolMarine"
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "IDMClip"
	Obituary "%o was gunslinged by %k's Pistol."
	Inventory.Pickupmessage "Pistol!"
	Tag "Pistol"
	Decal BulletChip
	Damagetype "Bullet"
	AttackSound "weapons/pistol"
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
    +INVENTORY.IGNORESKILL
	+WEAPON.NOLMS
	States
	{
	Ready:
      PISG A 1 A_WeaponReady
      Loop
	Deselect:
      PISG A 0 A_Lower
      PISG A 0 A_Lower
      PISG A 1 A_Lower
	  Loop
	Select:
	  TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
	Sloop:
      PISG A 0 A_Raise
      PISG A 0 A_Raise
      PISG A 1 A_Raise
	  Loop
    Fire:
      PISG B 0 A_JumpIfInventory("PowerQuadDamage", 1, "Quad")
	  PISG B 0 A_FireBullets(2.8, 1.775, 1, 25, "IDMBulletPuff")
	  Goto FireEnd
	Quad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  PISG B 0 A_FireBullets(2.8, 1.775, 1, 25, "ExtremePuff")
	FireEnd:
	  PISG B 5 A_GunFlash
	  PISG C 4
	  PISG A 3
	  PISG A 3 A_Refire
	  Goto Ready
	Flash:
      PISF A 4 Bright A_Light1
      Goto LightDone
    Spawn:
      PIST A -1 Bright
      Stop
	}
}

ACTOR DualPistol : IDMPistol
{
	+POWERED_UP
	+WEAPON.CHEATNOTWEAPON
	Weapon.Sisterweapon "IDMPistol"
	Weapon.PreferredSkin "DualPistolMarine"
	Damagetype "Bullet"
	States
	{
	Ready:
      DPIS A 1 A_WeaponReady
      Loop
	Deselect:
      DPIS A 0 A_Lower
      DPIS A 0 A_Lower
      DPIS A 1 A_Lower
      Loop
	Select:
	  TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
	Sloop:
      DPIS A 0 A_Raise
      DPIS A 0 A_Raise
      DPIS A 1 A_Raise
      Loop
	Fire:
	  DPIS A 1
      DPIS B 0 A_JumpIfInventory("PowerQuadDamage", 1, "Quad")
	  DPIS B 0 A_FireBullets(4.2, 1.775, 1, 25, "IDMBulletPuff")
	  TNT1 A 0 A_GunFlash
      DPIS B 3 
      DPIS C 2
	  Goto Normal2
	Quad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  DPIS B 0 A_FireBullets(4.2, 1.775, 1, 25, "ExtremePuff")
	  TNT1 A 0 A_GunFlash
      DPIS B 3 
      DPIS C 2
	Normal2:
      DPIS B 0 A_JumpIfInventory("PowerQuadDamage", 1, "Quad2")
	  DPIS A 1 A_CheckReload
	  TNT1 A 0 A_FireBullets(4.2, 1.775, 1, 25, "IDMBulletPuff")
	  TNT1 A 0 A_GunFlash("Flash2")
	  DPIS D 3
      DPIS E 2
      DPIS A 5 A_ReFire
	  Goto Ready
	Quad2:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  DPIS A 1 A_CheckReload
	  TNT1 A 0 A_FireBullets(4.2, 1.775, 1, 25, "ExtremePuff")
	  TNT1 A 0 A_GunFlash("Flash2")
      DPIS D 3
      DPIS E 2
	  TNT1 A 0 A_ReFire
      Goto Ready
	Flash:
      DPIS F 4 Bright A_Light1
      Goto LightDone
	Flash2:
      DPIS G 4 Bright A_Light1
      Goto LightDone
	Spawn:
      PIST A -1 Bright
      Stop
	}
}